import { get, post, put, del } from '../utils/fetch'

const FormUrlencoded = {
    'Content-Type': 'application/x-www-form-urlencoded',
}
const FormDate = {
    'Content-Type': 'application/form-data',
}
// 通过projectId&collegeId获取公众号信息
export const querySourceInfo = (p) => get('/luffy/internal/api/v1/wx/source', p, { visitor: true })

// 通过x_field获取公众号信息
export const querySourceInfoByFlag = (p) =>
    get('/luffy/internal/api/v1/wx/flag', p, { visitor: true })

// 通过shopid获取公众号信息
export const querySourceInfoByShopId = (p) =>
    get('/luffy/internal/api/v1/wx/shop', p, { visitor: true })

// 发送验证码
export const sendmessage = (p) =>
    post('/sso/v1/member/sendmessage', p, { visitor: true, headers: FormUrlencoded })

// 验证码登录
export const loginByCode = (p) =>
    post('/api/v1/ucenter/loginsms', p, { visitor: true, headers: FormUrlencoded })
// 首页问题列表
export const fetchList = () => get('http://10.5.21.242:8080/api/v1/question/list', {}, {})

export const submitQuestion = (p) => post('http://10.5.21.242:8080/api/v1/question', p, {})

export const qsList = (p) => get('/api/v1/question/list',p);